PEOpenPrintJob
Use PEOpenPrintJob to prepare to print a report and return a handle which identifies that particular print job. The handle returned must be used in all subsequent calls related to that print job which require that information. This function is used as a mandatory part of a Custom-Print Link to retrieve the print job handle which is then used when required as parameter printJob in each additional Custom-Print Link function call.
C Syntax
short PEOpenPrintJob (
const char *reportFilePath );
Parameter
reportFilePath
| Specifies the file name and path of the report that you want to open. You must enclose this parameter in quotes.
|
Returns
- Returns the job number.
- Returns 0 if the report file does not exist or if an error occurs.
Remarks
- This function must be called before most other Crystal Report Engine functions are used.
- Only one print job can be configured at a time.
- PEClosePrintJob, must be called later to close the job.
- Report Path\Filename must be enclosed in quotes.
- For example, PEOpenPrintJob ("C:\CRW\REPORT1.RPT");
- Note: In C or C++, the slashes (\) in the string must be entered as double slashes (\\).
- This function opens the print job with the printer selected in the report (via the File|Printer Setup menu command) or the default printer (if no replacement printer has been selected in the report).
VB Syntax
Declare Function PEOpenPrintJob Lib "crpe32.dll" (ByVal RptName As
String) _
As Integer
Delphi Syntax
function PEOpenPrintJob (
reportFilePath: PChar
): Smallint stdcall;
dBASE for Windows Syntax
EXTERN CWORD PEOpenPrintJob (CSTRING) CRPE.DLL